import request from "@/utils/request";

// 查询设备主列表
export function listMain(query) {
  return request({
    url: "/equipment/main/list",
    method: "get",
    params: query,
  });
}

// 查询设备主所有列表
export function listAllMain(query) {
  return request({
    url: "/equipment/main/listAll",
    method: "get",
    params: query,
  });
}

// 查询设备主详细
export function getMain(id) {
  return request({
    url: "/equipment/main/getInfo/" + id,
    method: "get",
  });
}

// 新增设备主
export function addMain(data) {
  return request({
    url: "/equipment/main/add",
    method: "post",
    data: data,
  });
}

// 修改设备主
export function updateMain(data) {
  return request({
    url: "/equipment/main/edit",
    method: "post",
    data: data,
  });
}

// 删除设备主
export function delMain(id) {
  return request({
    url: "/equipment/main/remove/" + id,
    method: "get",
  });
}

// 设备统计
export function equipmentCount() {
  return request({
    url: "/equipment/main/countEquipment",
    method: "get",
  });
}
